home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload Trio 2 / Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO / dir39 / cyrix15.zip / README < prev   
Text File  |  1992-10-21  |  13KB  |  366 lines

  1.  
  2.              ░░▒▒▓▓  Cyrix Cx486SLC/DLC  ▓▓▒▒░░
  3.  
  4. ****************************** UTILITIES **********************************
  5.  
  6. Using the Cx486SLC/DLC Utilities
  7. ----------------------------------------------------------------------------
  8. This disk should contain the following files in the root directory
  9.     cx486.exe               interactive cache control utility
  10.     cx486.cfg               default cache settings .cfg file
  11.     cx_det.exe              detects the Cx486SLC/DLC microprocessor
  12.     dma_tst.exe             checks the dma cache coherency
  13.     cx486_cd.exe            forces the CD and NW bits to 0 in BIOS'
  14.                    that have incorrectly set these bits to 1.
  15.  
  16.  
  17. DETECTING the Cx486SLC/DLC
  18. ----------------------------------------------------------------------------
  19. To detect the Cx486SLC/DLC:
  20.     cx_det.exe
  21.  
  22. Note: The CX_DET.EXE program returns a 0 if the Intel part was found or 
  23.       a 1 if the Cyrix part is found.  The return values can be checked 
  24.       in a batch file using the ERRORLEVEL batch file command. 
  25.  
  26.  
  27. VIEWING the STATUS of the Cx486SLC/DLC CONTROL REGISTERS
  28. or
  29. INTERACTIVELY CONTROLLING the Cx486SLC/DLC INTERNAL CACHE with CX486.EXE
  30. ---------------------------------------------------------------------------
  31.  
  32. To use the CX486.EXE utility from the command line type:
  33.     cx486.exe         (set the path appropriately)
  34.  
  35. To get the CX486.EXE utility command line options type:
  36.     cx486.exe ?       (set the path appropriately)
  37.     or
  38.     cx486.exe h       
  39.  
  40. To automatically turn on the cache during boot using the CX486.CFG file
  41.   (or equialent) add the following line to the AUTOEXEC.BAT file:
  42.     cx486 q cx486.cfg       (set the path appropriately)
  43.       
  44.   *** READ APPENDIX A below on detailed information on the CX486.EXE ***
  45.            ***  program and the CX486.CFG file! *** 
  46.  
  47.  
  48.  
  49.  
  50. TESTING CACHE COHERENCY using the DMA_TST.EXE PROGRAM
  51. ---------------------------------------------------------------------------
  52. Note: The floppy drive is a DMA device that has the ability to modify
  53.      the contents of main memory without the cpu.  CPUs that contain
  54.      internal memory caches must have a method to keep the internal 
  55.      cache memory coherent with the external main memory.  This is
  56.      usually accomplished by adding circuitry on the motherboard
  57.      to monitor when a DMA transfer takes place.  The motherboard
  58.      DMA detection circuitry notifies the CPU when to invalidate 
  59.      the contents of the internal cache by asserting the CPU FLSH# 
  60.      pin.  
  61.      
  62. The purpose of the DMA_TST.EXE program is to detect if a DMA transfer 
  63. can complete succesfully with guaranteed cache coherency.  First, the
  64. internal cache is configured automatically so that the FLSH# pin 
  65. is enabled. Second, the DMA_TST.EXE program will run the test.  
  66. Failures will reveal a cache coherency error which may result in
  67. data corruption!  If the CPU FLSH# pin is NOT connected to an 
  68. appropriate DMA detection circuit, the test will likely fail. 
  69.  
  70.  
  71. TO RUN the DMA Cache Coherency test, install a any diskette 
  72.    
  73. 1.) Setup the CONFIG.SYS and AUTOEXEC.BAT file as follows:
  74.      Preferred setup for the CONFIG.SYS file  (DMA.BAT test ONLY)
  75.     files=20
  76.     buffers=20
  77.  
  78.      Preferred setup for the AUTOEXEC.BAT file (DMA.BAT test ONLY)
  79.     prompt $p$g
  80.     path c:\dos
  81.      
  82.      Note : ALL memory managers must be completely disabled in 
  83.      the CONFIG.SYS FILE or this test will incorrectly display 
  84.      a pass condition!!!
  85.  
  86. 2.) Install any formatted diskette in drive A: and type:
  87.     dma_tst.exe            (in the current directory)
  88.  
  89.     To run the test "q"uickly and get a "Pass/Fail" answer type:
  90.     dma_tst.exe q    
  91.  
  92.     To get the DMA_TST.EXE utility command line options type:
  93.     dma_tst.exe ?   
  94.     or
  95.     dma_tst.exe h   
  96.  
  97. Note: The DMA_TST.EXE program returns a 0 if the test passes or a 1 if
  98.       the test fails.  The return values can be checked in a batch file
  99.       using the ERRORLEVEL batch file command. 
  100.  
  101.  
  102. CLEARING the Cache Disable CD Bit in systems with misbehaved BIOS
  103. ---------------------------------------------------------------------------
  104. Some systems have BIOS' that incorrectly set the Cache Disable "CD" bit. 
  105. Bits 30 and 29 of the 386 CR0 registers were reserved and should not 
  106. have been set by the BIOS.  The CX486_CD.EXE program can be used on those
  107. machines which have this misfortune in the BIOS.  CX486_CD.EXE is intended
  108. for DOS only and cannot be used in a DOS window in WINDOWS or OS/2.  This
  109. is due to the protected mode features of the operating system that does not
  110. allow a program to update the CR0 register.
  111.  
  112.     To run the CX486_CD.EXE program in the AUTOEXEC.BAT file "q"uickly type: 
  113.     cx486_cd.exe q    
  114.      
  115.     To get command line information on how to use the CX486_CD.EXE utility
  116.       type:
  117.      cx486_cd.exe    or    cx486_cd.exe ?
  118.  
  119.  
  120. ****************************** APPENDIX A ***********************************
  121.  
  122.   Notes about the CX486.CFG file
  123.  
  124.   The CX486.CFG file is used by the CX486.EXE program to configure the cache 
  125.   registers automatically according to the data contained in the CX486.CFG  
  126.   file.  Refer to the "CX486SLC/DLC Data Sheet" on the exact definitions  
  127.   of the control registers.  The CX486.EXE utility has screen sensitive
  128.   help which may assist you in configuring the cache.  
  129.  
  130.   The CX486.CFG file or equivalent can be created by the (F)ile Utilities 
  131.   command in the CX486.EXE utility or edited using a text editor.
  132.   (Several *.CFG files are on this disk as examples.)
  133.   
  134.      *** Editing the CX486.CFG file or equivalent: ***
  135.   CX486.EXE reads each line in this file looking for a matching 
  136.   token(setup string) so it can convert the string into the value for 
  137.   the appropriate register. The exact format of the file is:
  138.  
  139.   Setup Strings (all values in HEX)
  140.   CC_0=03
  141.   CC_1=00
  142.   ARR_C4=00
  143.   ARR_C5=00
  144.   ARR_C6=00
  145.   ARR_C7=00
  146.   ARR_C8=00
  147.   ARR_C9=00
  148.   ARR_CA=00
  149.   ARR_CB=00
  150.   ARR_CC=00
  151.   ARR_CD=00
  152.   ARR_CE=00
  153.   ARR_CF=00
  154.  
  155.   To edit the CX486.CFG file, look for the token(setup string) line 
  156.   that matches the register to change/configure. Enter a HEX value 
  157.   that appropriately sets up the register.  You can edit the 
  158.   value on the right side of the "=" sign, but you cannot edit/rename 
  159.   the token(setup string) on the left side of the "=" sign.
  160.  
  161.   Below are the bit definitions for the CX486SLC/DLC control registers:
  162.   .......................................................
  163.   Cache Configuration Register 0
  164.  
  165.     Register 0C0h
  166.  
  167.     Bit 0   - NC0:   If = 1, sets the first 64K bytes at each 1M byte
  168.           boundary as non-cacheable, when operating in real or
  169.           virtual 8086 mode.
  170.         1   - NC1:   If = 1, sets the 640K to 1M region as non-
  171.           cacheable.
  172.         2   - A20M:  If = 1, enables A20M# input pin.
  173.         3   - KEN:   If = 1, enables KEN# input pin.
  174.         4   - FLUSH: If = 1, enables KEN# input pin.
  175.         5   - BARB:  If =, enables flushing of internal cache when
  176.           hold state is entered.
  177.         6   - C0: Selects cache organization:
  178.             0 = 2-way set associative
  179.             1 = directed mapped
  180.         7   - SUSPEND: If = 1, enables SUSP# input and SUSPA# output
  181.           pins.
  182.  
  183.    setup string (value in HEX)
  184.    CC_0=1
  185.  
  186.   .......................................................
  187.    Cache Configuration Register 1
  188.  
  189.    Register 0C1h
  190.  
  191.    Bit(0)= RPL:  If = 1, enables output pins RPLSET and RPLVAL#.  If
  192.           not enabled, outputs RPLSET and RPLVAL# wil float.
  193.       (1)= SMI:  Enable SMM Pins. If=1, SMI# and SMADS#  pins are enabled,
  194.            otherwise SMI# input is ignored and SMADS# will float.   
  195.       (2)= SMAC: System Management Memory Access. If=1, accesses to SMM    
  196.             memory space will be issued with SMADS# output active.   
  197.       (3)= MMAC: Main Memory Access. If=1, all data accesses within a SMI  
  198.             service routine will access main memory.                 
  199.       (4)= WP1:  ARR1 0=Non-Cacheable Region, 1=Cacheable & Write Protected
  200.       (5)= WP2:  ARR2 0=Non-Cacheable Region, 1=Cacheable & Write Protected
  201.       (6)= WP3:  ARR3 0=Non-Cacheable Region, 1=Cacheable & Write Protected
  202.       (7)= SM4:  Address Region 4 Control. If=1, Region 4 is Non-cacheable
  203.             SMM memory space, otherwise SMI# input is ignored.
  204.  
  205.    setup string (value in HEX)
  206.    CC_1=0
  207.   
  208.    .......................................................
  209.    Address Region Sizes:
  210.  
  211.    For Reference:
  212.       0    =         Disabled   
  213.       1    =         4 Kbytes   
  214.       2    =         8 Kbytes   
  215.       3    =        16 Kbytes   
  216.       4    =        32 Kbytes   
  217.       5    =        64 Kbytes   
  218.       6    =       128 Kbytes   
  219.       7    =       256 Kbytes   
  220.       8    =       512 Kbytes   
  221.       9    =         1 Mbytes   
  222.      0Ah   =         2 Mbytes   
  223.      0Bh   =         4 Mbytes   
  224.      0Ch   =         8 Mbytes   
  225.      0Dh   =        16 Mbytes   
  226.      0Eh   =        32 Mbytes   
  227.      0Fh   =         4 Gbytes   
  228.  
  229.    NOTE: The "user input starting address" for the 
  230.       Address Region Registers(ARR) should fall on a 
  231.       boundary that coincides with the size of the
  232.       Address Region.  CX486.EXE automatically translates
  233.       the starting address to the "effective starting address" 
  234.       calculated by the Cx486SLC/DLC.
  235.  
  236.      Example 1 (correct):
  237.     To setup a 640k (address A0000) to 1M (address 100000) region:
  238.  
  239.     ARR1 start address: A0000  size: 128k    (A0000 is on 128k boundary)
  240.     ARR2 start address: C0000  size: 256k    (C0000 is on 256k boundary)
  241.  
  242.      Example 2 (correct):
  243.     To setup a 512k (address 80000) to 1M (address 100000) region:
  244.  
  245.     ARR1 start address: 80000  size: 512k    (80000 is on 512k boundary)
  246.  
  247.    .......................................................
  248.    Address Region 1
  249.  
  250.     Register C4, C5, and C6
  251.  
  252.     C4h
  253.     Bits 7-0 - Address bits A31 - A24 of Region 1 starting address
  254.  
  255.     C5h
  256.     Bits 7-0 - Address bits A23 - A16 of Region 1 starting address
  257.  
  258.     C6h
  259.     Bits 7-4 - Address bits A15 - A12 of Region 1 starting address
  260.          3-0 - Size of Address Region 1
  261.  
  262.    setup strings (values in HEX)
  263.    ARR_C4=00
  264.    ARR_C5=0a
  265.    ARR_C6=06
  266.  
  267.   .......................................................
  268.    Address Region 2
  269.  
  270.     Register C7, C8 and C9h
  271.  
  272.     C7h
  273.     Bits 7-0 - Address bits A31 - A24 of Region 2 starting address
  274.  
  275.     C8h
  276.     Bits 7-0 - Address bits A23 - A16 of Region 2 starting address
  277.  
  278.     C9h
  279.     Bits 7-4 - Address bits A15 - A12 of Region 2 starting address
  280.          3-0 - Size of Address Region 2
  281.  
  282.    setup strings (values in HEX)
  283.    ARR_C7=00
  284.    ARR_C8=0c
  285.    ARR_C9=07
  286.  
  287.   .......................................................
  288.    Address Region 3
  289.  
  290.     Register CA, CB and CCh
  291.  
  292.     CAh
  293.     Bits 7-0 - Address bits A31 - A24 of Region 3 starting address
  294.  
  295.     CBh
  296.     Bits 7-0 - Address bits A23 - A16 of Region 3 starting address
  297.  
  298.     CCh
  299.     Bits 7-4 - Address bits A15 - A12 of Region 3 starting address
  300.          3-0 - Size of Address Region 3
  301.  
  302.    setup strings (values in HEX)
  303.    ARR_CA=00
  304.    ARR_CB=00
  305.    ARR_CC=00
  306.  
  307.   .......................................................
  308.   Address Region 4
  309.  
  310.     Register CD, CE and CFh
  311.  
  312.     CDh
  313.     Bits 7-0 - Address bits A31 - A24 of Region 4 starting address
  314.  
  315.     CEh
  316.     Bits 7-0 - Address bits A23 - A16 of Region 4 starting address
  317.  
  318.     CFh
  319.     Bits 7-4 - Address bits A15 - A12 of Region 4 starting address
  320.          3-0 - Size of Address Region 4
  321.  
  322.    setup strings (values in HEX)
  323.    ARR_CD=00
  324.    ARR_CE=00
  325.    ARR_CF=00
  326.  
  327. ******************** APPENDIX B - PROGRAMMING EXAMPLES ********************
  328.  
  329. The programming examples supplied on this disk are ASSEMBLY language
  330. routines.  MAKE files are provided with debugging switches enabled for your
  331. reference.  Each example is under its respective directory.
  332.  
  333.  
  334. TURNING ON the Cx486SLC/DLC INTERNAL CACHE - Example
  335. ----------------------------------------------------------------------------
  336.     do_cache.asm - example to enable the internal cache registers with a
  337.                640k to 1M non-cacheable region.
  338.  
  339.  
  340. TURNING OFF the Cx486SLC/DLC INTERNAL CACHE - Example
  341. ----------------------------------------------------------------------------
  342.     no_cache.asm - example to return to internal cache registers
  343.                to the reset state.
  344.  
  345.  
  346. DETECTING the Cx486SLC/DLC
  347. ----------------------------------------------------------------------------
  348.     cx_det.c     - C code driver program for detect.asm
  349.     detect.asm   - example to detect the Cx486SLC/DLC using
  350.                the undefined arithmetic flags after a
  351.                divide instruction.
  352.  
  353.  
  354. CX486.EXE REVSION STATUS:
  355. ----------------------------
  356. rev 1.0 - ported code from m5 utility
  357. ----------------------------
  358. rev 1.1 - added more command line control
  359. ----------------------------
  360. rev 1.2 - edited text
  361.     1.21- fixed paging bit
  362.     1.22- added compatibility with m5.cfg file format.
  363.     1.23- fixed out of range values in do_edit
  364. ----------------------------
  365.  
  366.